package com.rop.znyx.sys.controller;


import com.rop.znyx.common.result.Result;
import com.rop.znyx.model.sys.Ware;
import com.rop.znyx.sys.service.WareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 仓库表 前端控制器
 * </p>
 *
 * @author rop
 * @since 2023-06-22
 */

@Api(tags = "仓库管理")
@RestController
@RequestMapping("admin/sys/ware")
@RequiredArgsConstructor

public class WareController {

    private final WareService wareService;

    /**
     * 查询所有仓库
     */
    @ApiOperation("查询所有仓库")
    @GetMapping("findAllList")
    public Result<List<Ware>> findAllList() {
        return Result.ok(wareService.list());
    }
}

